<%@ include file="/en/jsp/static.jsp" %>
<%@ taglib uri="/linuxbox/bbs.tld" prefix="bbs" %>
<%
  String CAT_ID = (String)request.getAttribute("CAT_ID");
  String CAT_NAME = (String)request.getAttribute("CAT_NAME");
  String TOPIC_ID = (String)request.getAttribute("TOPIC_ID");
  String MSG_ID = (String)request.getAttribute("MSG_ID");
  String IND_LVL = (String)request.getAttribute("IND_LVL");
  String SUBJECT = (String)request.getAttribute("SUBJECT");
  String AUTHOR = (String)request.getAttribute("AUTHOR");
  String SUB_DATE = (String)request.getAttribute("SUB_DATE");
  String SUB_TIME = (String)request.getAttribute("SUB_TIME");
  String MSG_BODY = (String)request.getAttribute("MSG_BODY");
  String PREV_TOPIC = (String)request.getAttribute("PREV_TOPIC");
  String NEXT_TOPIC = (String)request.getAttribute("NEXT_TOPIC");
%>
<jsp:include page="/en/jsp/header.jsp" flush="true"/>

<script Language="JavaScript">

function confirmDel() {
  return confirm("Are you sure?");
}

function onChangeCategory()
{
    document.theForm.submit();
}
</SCRIPT>


<table width="100%" height=26 align=middle border=0 cellpadding=0 cellspacing=0 bgcolor="#f4f4f4" style="font-size:16px;color:#d05000">
  <tr>
    <td>
      &nbsp;<img src="<%=BoxStatic.imageDir%>itemball.jpg" width=14 height=15 border=0 align="absmiddle">
      <b><%=boxName%> - BBS[<%=CAT_NAME%>] View</b>
    </td>
<FORM action="<%=BoxStatic.servletDir%>BbsContentAction" method="POST" name="theForm" >
    <td ALIGN="right" valign="top">
      <a href="<%=BoxStatic.jspDir%>bbs/BbsNewList.jsp">New List</a>&nbsp;|&nbsp;

      <a href="<%=BoxStatic.jspDir%>bbs/BbsQueryAll.jsp">Search</a>

      &nbsp;|&nbsp;View Category
        <SELECT NAME="CAT_ID" onclick="onChangeCategory()">
          <bbs:BbsCatList listType="list" selected="<%=CAT_ID%>" />
        </select>
    </td>
</FORM>
  </tr>
</table>

<hr width="100%" color=#E06000 align=left>

  <table width="100%" height=26 align=middle border=0 cellpadding=1 	cellspacing=0 >
    <tr>
      <td nowrap align=left>
      <% if (PREV_TOPIC != null) { %>
        <a href="<%=BoxStatic.servletDir%>BbsViewAction?TOPIC_ID=<%=PREV_TOPIC%>&CAT_ID=<%=CAT_ID%>">
        <img src="<%=BoxStatic.imageDir%>redleft.gif" alt="Previous Topic" border=0 width=29 height=28>
        </a>
      <% } %>

      <% if (NEXT_TOPIC != null) { %>
        <a href="<%=BoxStatic.servletDir%>BbsViewAction?TOPIC_ID=<%=NEXT_TOPIC%>&CAT_ID=<%=CAT_ID%>">
        <img src="<%=BoxStatic.imageDir%>redright.gif" alt="Next Topic" border=0 width=29 height=28>
        </a>
      <% } %>

        <a href="<%=BoxStatic.servletDir%>BbsContentAction?CAT_ID=<%=CAT_ID%>">
        <img src="<%=BoxStatic.imageDir%>doc02.gif" alt="BBS Content" border="0">
        </a>

        <a href="<%=BoxStatic.servletDir%>BbsProposeFormAction?CAT_ID=<%=CAT_ID%>">
        <img src="<%=BoxStatic.imageDir%>doc01.gif" alt="Propose New Message" border="0">
        </a>

        <a href="<%=BoxStatic.servletDir%>BbsProposeFormAction?CAT_ID=<%=CAT_ID%>&MSG_ID=<%=MSG_ID%>&TOPIC_ID=<%=TOPIC_ID%>">
        <img src="<%=BoxStatic.imageDir%>doc03.gif" alt="Reply message" border="0">
        </a>
      </td>

      <td align=right>
        <a href="<%=BoxStatic.servletDir%>BbsDelAction?CAT_ID=<%=CAT_ID%>&MSG_ID=<%=MSG_ID%>&TOPIC_ID=<%=TOPIC_ID%>">
        <img src="<%=BoxStatic.imageDir%>delete.gif" alt="Delete this message" Onclick='return confirmDel()' border="0">
        </a>
      </td>
    </tr>
  </table>

  <table width="100%" border=1 cellpadding=4 cellspacing=0 style="font-size:14px">
    <tr><td bgcolor=#f0f0f0>
      <bbs:ShowTopic topicID="<%=TOPIC_ID%>" catID="<%=CAT_ID%>" msgID="<%=MSG_ID%>"/>
    </td></tr>

    <tr><td bgcolor="#ffffdf">
    <b><%=SUBJECT%></b> [ <%=AUTHOR%>, <%=SUB_DATE%> <%=SUB_TIME%> ]
    </td></tr>

    <tr><td align="left"><%=MSG_BODY%></td></tr>
  </table>

<hr width=\"100%\" color=#E06000 align=left>

  <table width="98%" border=0  cellpadding=0 cellspacing=0>
    <tr>
    <td nowrap align=left>
    <% if (PREV_TOPIC != null) { %>
      <a href="<%=BoxStatic.servletDir%>BbsViewAction?TOPIC_ID=<%=PREV_TOPIC%>&CAT_ID=<%=CAT_ID%>">
      <img src="<%=BoxStatic.imageDir%>redleft.gif" alt="Previous Topic" border=0 width=29 height=28>
      </a>
    <% } %>

    <% if (NEXT_TOPIC != null) { %>
      <a href="<%=BoxStatic.servletDir%>BbsViewAction?TOPIC_ID=<%=NEXT_TOPIC%>&CAT_ID=<%=CAT_ID%>">
      <img src="<%=BoxStatic.imageDir%>redright.gif" alt="Next Topic" border=0 width=29 height=28>
      </a>
    <% } %>

      <a href="<%=BoxStatic.servletDir%>BbsContentAction?CAT_ID=<%=CAT_ID%>">
      <img src="<%=BoxStatic.imageDir%>doc02.gif" alt="BBS Content" border="0">
      </a>

      <a href="<%=BoxStatic.servletDir%>BbsProposeFormAction?CAT_ID=<%=CAT_ID%>">
      <img src="<%=BoxStatic.imageDir%>doc01.gif" alt="Propose New Message" border="0">
      </a>

      <a href="<%=BoxStatic.servletDir%>BbsProposeFormAction?CAT_ID=<%=CAT_ID%>&MSG_ID=<%=MSG_ID%>&TOPIC_ID=<%=TOPIC_ID%>">
      <img src="<%=BoxStatic.imageDir%>doc03.gif" alt="Reply message" border="0">
      </a>
    </td>

    <td align=right>
      <a href="<%=BoxStatic.servletDir%>BbsDelAction?CAT_ID=<%=CAT_ID%>&MSG_ID=<%=MSG_ID%>&TOPIC_ID=<%=TOPIC_ID%>">
      <img src="<%=BoxStatic.imageDir%>delete.gif" alt="Delete this message" Onclick='return confirmDel()' border="0">
      </a>
    </td>
    </tr>
  </table>
<jsp:include page="/en/jsp/footer.jsp" flush="true"/>
